package io.finer.erp.jeecg.bas.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.finer.erp.jeecg.bas.vo.OrderVO;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.beans.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 商城订单信息表
 * @Author: jeecg-boot
 * @Date:   2020-08-28
 * @Version: V1.0
 */
@ApiModel(value="zrk_shoporder对象", description="商城订单信息表")
@Data
@TableName("zrk_shoporder")
public class ZrkShoporder implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	/**商城订单号*/
	@Excel(name = "商城订单号", width = 15)
    @ApiModelProperty(value = "商城订单号")
    private java.lang.String shopOrder;
	/**客户名称*/
	@Excel(name = "客户名称", width = 15, dictTable = "bas_customer", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "客户名称")
    private java.lang.String customerName;
	/**客户手机号*/
	@Excel(name = "客户手机号", width = 15)
    @ApiModelProperty(value = "客户手机号")
    private java.lang.String customerMobile;
	/**客户地址*/
	@Excel(name = "客户地址", width = 15)
    @ApiModelProperty(value = "客户地址")
    private java.lang.String customerAddress;
	/**订单状态*/
	@Excel(name = "订单状态", width = 15, dicCode = "orderStatus")
    @Dict(dicCode = "orderStatus")
    @ApiModelProperty(value = "订单状态")
    private java.lang.String orderStatus;
	/**订单金额*/
	@Excel(name = "订单金额", width = 15)
    @ApiModelProperty(value = "订单金额")
    private java.math.BigDecimal orderMoney;
	/**订单创建时间*/
	@Excel(name = "订单创建时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "订单创建时间")
    private java.util.Date orderTime;
	/**业务员*/
	@Excel(name = "业务员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
    @ApiModelProperty(value = "业务员")
    private java.lang.String salsUser;
	/**是否生成工单*/
	@Excel(name = "是否生成工单", width = 15, dicCode = "yn")
	@Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否生成工单")
    private java.lang.String isPush;
	/**是否生成业务薪资数据*/
	@Excel(name = "是否生成业务薪资数据", width = 15, dicCode = "yn")
	@Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否生成业务薪资数据")
    private java.lang.String isSalary;
	/**客户编号*/
	@Excel(name = "客户编号", width = 15)
    @ApiModelProperty(value = "客户编号")
    private java.lang.String customerId;
	/**商城流水号*/
	@Excel(name = "商城流水号", width = 15)
    @ApiModelProperty(value = "商城流水号")
    private java.lang.String orderCode;
	/**是否生成业务薪资数据*/
	@Excel(name = "是否生成业务薪资数据", width = 15, dicCode = "yn")
	@Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否生成业务薪资数据")
    private java.lang.String isReceipt;
	/**支付类型*/
	@Excel(name = "支付类型", width = 15)
    @ApiModelProperty(value = "支付类型")
	@Dict(dicCode = "sale_order_pay_type")
    private java.lang.String payType;
	
	/**订单备注*/
	@Excel(name = "订单备注", width = 15)
    @ApiModelProperty(value = "订单备注")
    private java.lang.String remark;
	/**订单类型*/
	@Excel(name = "订单类型", width = 15)
    @ApiModelProperty(value = "订单类型")
    private java.lang.String orderType;
	/**订单编号*/
	@Excel(name = "订单编号", width = 15)
    @ApiModelProperty(value = "订单编号")
	private java.lang.String orderNo;
	/**货运方式*/
	@Excel(name = "货运方式", width = 15)
    @ApiModelProperty(value = "货运方式")
	@Dict(dictTable = "zrk_delivery_method", dicText = "name", dicCode = "id")
	private java.lang.String expressType;
	/**工序*/
	private java.lang.String processId;
	/**是否已作废*/
	@Dict(dicCode = "yn")
	private java.lang.String delFlag;
	/**是否打印金额*/
	@Dict(dicCode = "yn")
	private java.lang.String isPrintMoney;
	/**销售单核销状态*/
	@Excel(name = "销售单核销状态", width = 15)
	@ApiModelProperty(value = "销售单核销状态")
	@Dict(dicCode = "hxStatus")
	private java.lang.String orderHxStatus;
	/**核销金额*/
	@Excel(name = "核销金额", width = 15)
	@ApiModelProperty(value = "核销金额")
	private java.lang.String hxPrice;
	/**核销id*/
	@Excel(name = "核销id", width = 15)
	@ApiModelProperty(value = "核销id")
	private java.lang.String hxId;

	public ZrkShoporder(OrderVO orderVO){
        BeanUtils.copyProperties(orderVO, this);
        this.setOrderStatus("2");
        this.setIsPush("0");
        this.setIsSalary("0");
        this.setRemark(orderVO.getProductionRemarks());
        this.setOrderType("代下单");
        this.setOrderTime(new Date());
        this.setDelFlag("0");
    }

    public ZrkShoporder() {
    }

}